import { ADDOFFICE } from '../constant'

// 初始化数据

const initState = ['骨科', '内科', '外科', '妇科', '儿科', '脑科']

export default function addReducer(preState = initState, action) {
    // console.log('正在操作reduse...');
    const { type, data } = action
    switch (type) {
        case ADDOFFICE: return [data, ...preState]
        default: return preState
    }
}